import 'package:flutter/material.dart';

import '../common/kline_config.dart';
import '../vo/bar_chart_vo.dart';

class ExampleRmoData {
  static final List<double?> _dataList = [
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    -32.72797683189682,
    -32.72797683189682,
    -32.41231505477911,
    -32.123140152657584,
    -31.355284425753176,
    -30.76963320758682,
    -28.926825390617985,
    -26.611643583036123,
    -24.788174797183906,
    -23.301981919860474,
    -22.093945200802715,
    -21.077993504569537,
    -20.151887689432613,
    -19.991566945141773,
    -21.148688128132505,
    -22.193072175088034,
    -23.00367649434702,
    -23.204139415216613,
    -23.19071461061306,
    -23.12474401839495,
    -22.767945052957014,
    -22.645001615275376,
    -22.546225391478583,
    -21.66861325032464,
    -20.72796324765882,
    -19.725185837707524,
    -17.679701158797695,
    -15.683951440922245,
    -13.627185164092666,
    -11.60734681014386,
    -10.213648412582941,
    -9.042991989525964,
    -8.370422625586063,
    -8.447476707682846,
    -8.53339715002595,
    -8.78627356579352,
    -9.341438604895911,
    -10.063774275190081,
    -10.461668448431459,
    -9.800939779371559,
    -9.479856512771415,
    -9.263171558345165,
    -10.060785228416027,
    -11.145658615216377,
    -12.211422560945268,
    -12.733845930816642,
    -12.642809448279957,
    -12.629320881465638,
    -12.511810269751228,
    -11.891899500976816,
    -10.471707540300507,
    -9.70876145318953,
    -8.779231233866316,
    -8.671983644701902,
    -7.8817241622962895,
    -6.838192220702786,
    -5.663497896047991,
    -5.198208492773143,
    -4.131419260375967,
    -2.587073279888817,
    -1.512370917603107,
    -0.8536633650416693,
    -1.2101304912871746,
    -1.9043624088875697,
    -2.5551927536661974,
    -2.723043529597069,
    -3.246036717476974,
    -3.393684947263382,
    -1.6165558732224505,
    -0.2856130871104048,
    0.8515269800680897,
    1.8610126626787462,
    1.5282920995004439,
    1.2849807990954318,
    0.9916878824615265,
    1.7981065519470545,
    1.9933374480587358,
    2.801510368389109,
    1.971277840133423,
    2.433176536968654,
    2.945135559536845,
    3.661063401580677,
    4.5333977896760915,
    5.786713733668465,
    6.294725533422544,
    5.947736948305717,
    5.674717136778947,
    4.3250865279723545,
    3.3171575882657343,
    2.883588135695729,
    1.8072285495408817,
    1.6867558725835958,
    1.6800549269444498,
    3.162786143388178,
    4.414795170378718,
    5.252932788174372,
    6.221684754142255,
    7.173735722492976,
    7.9789302882803765,
    8.499259170558393,
    9.052827879646166,
    9.045808273763615,
    9.493059755971391,
    9.28883824188846,
    9.083485434522427,
    8.65936737456495,
    8.477221981282883,
    8.254798825548036,
    7.622914877084877,
    8.366441080671546,
    9.752279115962418,
    8.901407343825115,
    7.915155908742419,
    7.698481490369048,
    8.356121975846042,
    7.858786153529521,
    6.992486364215766,
    5.576448824389989,
    4.84523619661282,
    5.195028286864445,
    6.567438619592404,
    7.843140662991423,
    8.732172485979582,
    9.702892041062148,
    10.05776417484422,
    9.881791329053843,
    10.005752012913888,
    10.192401659921748,
    10.345046361486686,
    10.865061912725176,
    10.564916061957506,
    10.024062080839895,
    8.918585242740171,
    7.347230581545862,
    5.980098612388243,
    4.997219702725911,
    4.259772514205893,
    3.643234019717873,
    3.7543761478835607,
    3.6680546726770347,
    4.218390147243549,
    4.599707188094143,
    2.8873052069587275,
    1.396926015267204,
    -0.11262240344134672,
    -0.9792692131515575,
    -0.9989237185417332,
    -1.309264187650616,
    0.12938269720723644,
    1.6701838712988701,
    2.8105155670464503,
    3.6819008318115816,
    3.075236448087915,
    1.820925921284324,
    2.826470681465489,
    3.885037831126563,
    4.634469845545414,
    5.5586573981483145,
    6.474084843104314,
    6.818448908865489,
    6.533147395198032,
    6.842043140611661,
    7.702052659862906,
    8.387735330663807,
    8.9544853474705,
    9.043403347660599,
    8.791027645710079,
    8.860113900832582,
    8.725615323874585,
    9.093084410717918,
    9.213452582703846,
    10.013075485513024,
    11.334090435380041,
    11.12269855133383,
    12.068171594518828,
    12.395076963872388,
    12.822257032724831,
    12.873560470395676,
    12.57127235493643,
    11.416000437956574,
    10.899608490971296,
    9.871252629025618,
    8.027873178573927,
    6.485673901403103,
    5.525066763564019,
    4.834644975123446,
    3.987478653655963,
    3.422040257091955,
    3.1730912597902816,
    4.053130551388715,
    4.804891757884439,
    4.871556930200761,
    3.783172498864157,
    2.276471177683103,
    0.9154910679104585,
    0.6808455843140725,
    0.800314696854561,
    1.0892429372938943,
    1.3971355105860361,
    1.2211877477832775,
    1.5888446855328069,
    -0.11327760703384561,
    0.3256162253228629,
    0.1918517357991979,
    -1.091060174399309,
    -1.645443146457087,
    -1.3161545027620103,
    -0.38014495744682814,
    0.9302781247512051,
    1.9613649303678538,
    2.3200282486048662,
    2.0521792802185144,
    2.0011572894930385,
    1.8507236317648195,
    1.5726589408574965,
    0.6480469814786289,
    -0.8061459670316167,
    -1.7350167901220501,
    -2.509495898034943,
    -3.4256781224602,
    -4.154176469846907,
    -3.207400553178491,
    -1.5549302018686302,
    0.18258264673572178,
    1.4362234039661255,
    2.4097453060709637,
    2.7484562580661,
    2.857504635123258,
    3.1225662993427767,
    3.4040828010141313,
    3.3992604611678403,
    3.595007949518711,
    4.907306889746923,
    5.445305893589646,
    5.082607609325018,
    4.729365037443016,
    3.4378630522131592,
    2.87029590490932,
    3.1259788437330855,
    4.0676523896985355,
    4.135375698137938,
    4.621194099788618,
    4.104056610541633,
    3.57939834157307,
    4.9046555361951425,
    6.126618437845636,
    6.851973929655991,
    6.90447409475045,
    6.335034045791118,
    5.36205796432992,
    4.5240038245973295,
    3.7414002546087306,
    4.317643326869976,
    4.53820794306157,
    5.113933509064771,
    5.863957765001009,
    5.2928871401201345,
    3.4321877324533063,
    1.8793930424284153,
    0.8119595476190429,
    -0.047330046481036794,
    -0.9407259599815107,
    -1.8344234115281612,
    -1.7210675544319358,
    -1.3992887355781385,
    -1.1063204736600543,
    -0.2127889094970322,
    -0.6275227959778134,
    -1.8285180161470818,
    -2.2613141817847757,
    -1.4725791306030567,
    -2.9012466168944253,
    -3.5942593370960814,
    -3.0219367254123966,
    -2.823435330555773,
    -3.8790290201697863,
    -4.893049626179811,
    -5.675386817342467,
    -6.196393218476131,
    -6.722462475929836,
    -6.159427628352229,
    -5.9106535449119875,
    -5.800396211559882,
    -6.378021251193516,
    -7.463119609773973,
    -8.285939386822175,
    -9.052294944942053,
    -10.196351756633494,
    -11.273346620903652,
    -11.96684927764944,
    -12.247790945303421,
    -12.443432862553513,
    -12.232991550749984,
    -12.008712097497352,
    -11.802881180893253,
    -11.684872984571847,
    -11.32660412176221,
    -9.083040595470381,
    -7.101467838159713,
    -5.579608494387901,
    -4.462956242386526,
    -3.7417749294583564,
    -3.2692183504466716,
    -3.2665119211540814,
    -2.571199015027979,
    -2.2358864468150554,
    -3.1432371099306833,
    -4.225739124826183,
    -4.9277914387624815,
    -5.6124464979532664,
    -6.544999356912438,
    -7.192380967465193,
    -7.9436836433533715,
    -8.345203081404488,
    -8.49762775606213,
    -7.923403816441583,
    -7.794561942981429,
    -7.07082404479603,
    -5.315117503625164,
    -3.993536351158351,
    -3.402796238753329,
    -1.9745309969972862,
    -1.1927631988954241,
    -1.3543450424553591,
    -1.4505756713606115,
    -1.962225174170424,
    -2.99783133291712,
    -4.0481631715224395,
    -4.895958771335119,
    -5.581123313923781,
    -5.830010450752821,
    -5.614537075227082,
    -5.124917257977017,
    -4.890085905276043,
    -3.7657634820156862,
    -2.2364667321405394,
    -1.1651355253786753,
    -0.2857981878694883,
    -0.08105696400862034,
    0.441586600275698,
    0.35929844681831885,
    0.5868472242150424,
    0.302852280990784,
    1.254309555320022,
    2.565053786706432,
    3.6019474929270925,
    4.105233445089575,
    4.025529593138736,
    3.3360693319261236,
    2.191238873604142,
    1.0494687755289904,
    -0.6990929334323004,
    -2.037697310260187,
    -3.0310984514056596,
    -3.784884694673948,
    -4.371635027691322,
    -4.617551703845246,
    -4.836850360013949,
    -3.9344597363476255,
    -3.2306109661014153,
    -1.9271594805892356,
    -1.4708467332321247,
    -1.4916125896156756,
    -2.2679292142769163,
    -2.1786448830657963,
    -2.110769445750289,
    -2.5111993478709675,
    -3.0194683738909784,
    -3.8393250903816436,
    -4.601853582753385,
    -5.414891962605719,
    -6.134482603979663,
    -5.911785619736471,
    -5.763774542992239,
    -5.401933915688479,
    -3.544962319814548,
    -1.8237500782744966,
    -0.5559243859499217,
    0.5403355626571347,
    0.6951420317056465,
    0.49245899797636244,
    -1.1313756646120128,
    -2.4026030476597753,
    -2.95652617056959,
    -3.5151612361337765,
    -3.8790258474942285,
    -3.9106257686902466,
    -4.185120199299485,
    -4.551933413203054,
    -4.851941064113281,
    -5.622882669257188,
    -6.230629017679144,
    -7.307768389607932,
    -7.996722740188243,
    -8.915491989576232,
    -9.131271213600105,
    -8.040332756467434,
    -7.052703891508753,
    -6.015484881141981,
    -5.213876616490069,
    -4.250081935377303,
    -4.548371759337573,
    -4.879032661549007,
    -6.405320065586098,
    -7.592942024429268,
    -7.815082362939911,
    -7.846828214817487,
    -6.2032302737562555,
    -4.796291570368997,
    -4.019079341941381,
    -4.180875974789682,
    -4.819075794528378,
    -6.004176461125373,
    -7.275937874962748,
    -7.319830664577834,
    -6.569045433850897,
    -5.808787330562261,
    -5.002749358323029,
    -4.158279984174968,
    -4.457324165351339,
    -5.260945624997199,
    -5.657571138008708,
    -5.873951691801385,
    -5.109620455379,
    -5.088635512684036,
    -5.71873971205244,
    -6.245540334862358,
    -6.997958510364924,
    -7.768174167842878,
    -8.441079846317434,
    -8.441459564317487,
    -8.77643821264261,
    -8.862217739062956,
    -9.523650202873652,
    -10.686105832617093,
    -11.742090229149081,
    -12.812248219499992,
    -12.683107176212532,
    -12.035422210640103,
    -11.814493421892733,
    -12.42916901299346,
    -12.153245670267028,
    -11.670378836661193,
    -10.694798934382685,
    -10.062922809583787,
    -8.734981221748507,
    -7.984018455669376,
    -7.167150797973428,
    -6.904294915625653,
    -6.92815273630128,
    -7.509986445083081,
    -6.497957055095674,
    -5.194971609787877,
    -3.748320441424804,
    -2.160546833632327,
    -1.1491353027628992,
    -0.3516944804091839,
    -0.30821326697323886,
    -0.5526423092957563,
    -0.9499281760745383,
    -0.9533108768752402,
    -0.09763147081415759,
    -0.710918302205145,
    -1.5444943875764476,
    -2.0490772164890583,
    -2.5485678771709153,
    -2.0113073395985426,
    -3.4640106050263193,
    -4.611631815013495,
    -4.205349884650282,
    -3.772818101672171,
    -3.8147777592534493,
    -3.8049010024221697,
    -4.388496185382408,
    -5.362368293157726,
    -5.995646086312511,
    -6.47993239989482,
    -7.066610292796485,
    -6.978703063166262,
    -7.137720076029421,
    -6.549912972300523,
    -5.93487917445526,
    -5.707886155797641,
    -4.183022507180867,
    -3.6986160357311793,
    -4.8725444591644305,
    -5.850042183864931,
    -6.888094894337999,
    -7.5934893613825,
    -8.151810233374118,
    -8.24014412606702,
    -8.355736967666745,
    -8.58122086627862,
    -8.187488358142014,
    -7.6777865333503,
    -7.211337003850987,
    -5.758964454976988,
    -4.821704317737106,
    -6.2626608781696165,
    -6.366038762100445,
    -4.671927417770843,
    -4.126737955149832,
    -3.7025316848657375,
    -3.714935844293246,
    -3.6943916360356335,
    -4.462517378163081,
    -4.706945468667979,
    -4.738488549545506,
    -3.8279952266448136,
    -2.594758023223568,
    -1.4572014523177128,
    -0.12864091977491965,
    0.65482038483999,
    1.184956667797635,
    1.4026571657373288,
    0.42245682288923836,
    -0.7406544207587009,
    -1.4315800084386785,
    -2.147064085704854,
    -2.7041933139610745,
    -3.8159396819073814,
    -5.1230844433360385,
    -6.13220745099509,
    -6.598209536223596,
    -6.851166037333668,
    -6.916850909429797,
    -7.366177564576137,
    -7.862007236874092,
    -8.162594689133444,
    -8.256547630247029,
    -8.740592042962907,
    -8.620870291866913,
    -8.987655750923455,
    -9.645993224986466,
    -10.305328435692754,
    -11.319239877374637,
    -11.718880935486258,
    -11.451995769584894,
    -11.342286160841041,
    -11.340203410146396,
    -11.4053146836796,
    -10.48073251855257,
    -9.175608628950982,
    -9.742679204639034,
    -10.064333969247567,
    -8.560659003803673,
    -8.330397683051372,
    -6.7530896662723086,
    -5.831747383343439,
    -5.861928266748549,
    -5.688124856610792,
    -4.639454292796088,
    -3.881877708538798,
    -4.151520227407501,
    -4.142171235786898,
    -2.937817592841185,
    -2.5779236182392626,
    -2.874109885953621,
    -2.8135835591698704,
    -3.2215697071173923,
    -4.346452162359398,
    -4.995161753202361,
    -3.502250668775045,
    -1.8161663807288706,
    -1.3021284787404654,
    -0.12818217415366429,
    -0.7758900704796021,
    -1.3477595723101523,
    -2.568570382705442,
    -3.159369551110752,
    -3.904529744986322,
    -4.349828513873857,
    -5.111322787925873,
    -5.280265848738817,
    -5.404670568891692,
    -6.247680793766088,
    -6.835916418200008,
    -7.901871125257539,
    -8.590388492216613,
    -8.758429354207658,
    -9.295844608245126,
    -9.144768673619348,
    -9.03152338885947,
    -8.852915596353434,
    -9.382412640537638,
    -9.970971751296485,
    -10.964831210016955,
    -12.213160811384293,
    -12.969956618498522,
    -13.39887919142596,
    -13.471368565040516,
    -13.846303349378145,
    -14.107064326869915,
    -13.494413588313561,
    -12.96527457017138,
    -12.988825419069851,
    -11.344797958709224,
    -9.9056156829551,
    -8.934284044798407,
    -8.088953842209385,
    -7.580833917565984,
    -6.191433421059148,
    -4.629568446748974,
    -3.4201212839768824,
    -2.8397203094804175,
    -2.6572264266504257,
    -2.832072184011484,
    -3.27495336733892,
    -2.91859059332287,
    -2.5913471757173525,
    -2.2732640588897857,
    -0.823125645954178,
    -0.8634580707267207,
    0.7869029293642391,
    2.0313778020866575,
    2.939325100451796,
    3.2329970073933945,
    4.090110099629143,
    4.508064774651964,
    4.372760055491164,
    4.4490383548856505,
    4.833072397704212,
    3.957079373331668,
    3.56364558240419,
    3.207115759700555,
    2.5783592920476153,
    2.8672969846193794,
    2.1112140759033755,
    1.0495160475534715,
    0.5633069606384132,
    0.3866891014529994,
    0.39202108378694955,
    -0.3145957703384745,
    0.47774814063882265,
    1.2244716799964033,
    1.3518092609718346,
    2.133243791191654,
    3.6288964005164606,
    5.0840485265659225,
    6.205768352832728,
    7.026212079559863,
    7.629390166003895,
    7.558152144092866,
    7.633283003762136,
    7.58386583571176,
    7.814654437245605,
    8.265062479853157,
    8.554749834925518,
    9.13853503075162,
    9.365637675614732,
    9.512153637662067,
    9.56066252029701,
    8.85209115769542,
    6.890278331884924,
    5.13147823676104,
    3.493489181177194,
    2.013322143221514,
    1.3764793675913727,
    0.6881065277666423,
    0.44267733223243877,
    0.061743389586658794,
    -0.47711417927560057,
    -0.6270566592781925,
    -1.3669837334488553,
    -2.255898764340555,
    -3.2762834694709655,
    -1.9277620201297745,
    -0.8553495011346022,
    -0.26713824869350955,
    0.20687022569855346,
    -0.11125762194740106,
    -0.9600224946931144,
    -1.3545641525971168,
    -0.43936883583982206,
    0.4489098878360285,
    1.5536200061711047,
    0.7025599145569602,
    -0.6589489464182279,
    -1.9769441341822638,
    -3.2898757978653377,
    -4.252179082355482,
    -4.9513289329973915,
    -5.553437442897756,
    -5.611747008229102,
    -5.886204486417403,
    -6.243149540518207,
    -6.774869036018533,
    -6.879994221179295,
    -6.61899827593781,
    -5.858463063120997,
    -5.468525241332766,
    -6.165978957499738,
    -6.529192623361308,
    -7.547284425313316,
    -7.339688280381843,
    -7.924469542248303,
    -7.415902377655272,
    -7.041091826091212,
    -7.11777941421593,
    -6.904660806237216,
    -5.812886812996579,
    -7.005252251501669,
    -8.296639963355998,
    -8.33313578742121,
    -6.866368683431423,
    -5.030509377806041,
    -3.4878133675362024,
    -3.0046947590764095,
    -3.176525792450545,
    -4.463090250432812,
    -5.974161029385834,
    -6.619491874875235,
    -7.35421029374701,
    -7.406681600098881,
    -6.581436063104767,
    -5.406698822575283,
    -3.9101724482895395,
    -2.4216877594269417,
    -1.650715560726526,
    -1.7528503721203579,
    -1.9188222793299383,
    -2.5145323749053388,
    -2.5920265411238494,
    -3.2068538010095113,
    -3.894230713885442,
    -4.330094273831988,
    -4.855378536503727,
    -5.154857773381262,
    -5.938330063779204,
    -6.7941829173704145,
    -7.4916994586813255,
    -7.491841041159442,
    -7.762864398365369,
    -8.26124598807895,
    -9.051475622276419,
    -9.684562436560377,
    -9.097581029880017,
    -8.483169846962252,
    -8.130703612352272,
    -7.386508874557263,
    -6.088390539432574,
    -6.121206665541948,
    -6.5683850478943935,
    -7.001546740525408,
    -8.215506288833646,
    -8.581277828693471,
    -8.648768795113938,
    -9.141186400721145,
    -9.600216629514735,
    -9.867072190815966,
    -10.528833904585488,
    -10.647062753274383,
    -10.520609034302682,
    -10.88243488102735,
    -10.792711494701825,
    -9.350332310210815,
    -8.383422528254998,
    -8.07984039194483,
    -8.60399824823939,
    -9.316823318011432,
    -9.817587634213114,
    -10.010856727616023,
    -9.794372847458384,
    -8.050109272436863,
    -6.409150775149252,
    -6.3260905340346225,
    -6.8772750197201535,
    -6.862506966941499,
    -6.7532552872840945,
    -6.4342338754935655,
    -6.809618415116344,
    -4.746617051333368,
    -3.34597446335362,
    -2.045667731016066,
    -0.47600065855001344,
    0.7094096357488605,
    1.1781029745626945,
    1.1350326563840636,
    1.6105869267034634,
    1.8488533093606425,
    1.6335501844831475,
    1.2237144549740602,
    1.11262991664808,
    0.9091794029284691,
    -0.5259798715890214,
    -1.9585718605859972,
    -2.7865069900490362,
    -3.3012437409848956,
    -4.008112968360024,
    -4.5702737413730965
  ];

  static BarChartVo get barChartData {
    List<BarChartData?> dataList = [];
    for (int i = 0; i < _dataList.length; ++i) {
      Color color = _dataList[i] == null || _dataList[i]! < 0
          ? KlineConfig.green
          : KlineConfig.red;
      bool isFill = true;
      dataList.add(
          BarChartData(value: _dataList[i] ?? 0, color: color, isFill: isFill));
    }

    return BarChartVo(name: 'RMO', data: dataList);
  }

  static BarChartVo get barChartDataMinute {
    List<BarChartData?> dataList = [];
    for (int i = 0; i < _dataList.length; ++i) {
      Color color = _dataList[i] == null || _dataList[i]! < 0
          ? KlineConfig.green
          : KlineConfig.red;
      bool isFill = true;
      dataList.add(
          BarChartData(value: _dataList[i] ?? 0, color: color, isFill: isFill));
    }

    dataList.length = KlineConfig.minuteDataNum;
    return BarChartVo(name: 'RMO', data: dataList);
  }
}
